/**
 * @url https://leetcode-cn.com/problems/serialize-and-deserialize-bst/
 * @author dingyue.zhf
 * @description 构造一颗红黑树 这一章比较复杂 先hold住
 */

const NIL = () => {
  return {
    key: 0,
    color: 1,
  };
};
class RedBlackTree {
  constructor(key = 0, color = 0, leftChild = NIL(), rightChild = NIL()) {
    this.key = key;
    this.color = color;
    this.leftChild = leftChild;
    this.rightChild = rightChild;
  }
  /**
   * 节点颜色
   * 0 红色
   * 1 黑色
   * 2 double black?
   */
  color;
  leftChild;
  rightChild;
  key;
}
